CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
PROJECT(locket)
IF (WIN32)  
    MESSAGE(STATUS "Now is windows")
    ADD_DEFINITIONS(-DWIN32)
ELSEIF (APPLE)  
    MESSAGE(STATUS "Now is Apple system.")  
    ADD_DEFINITIONS(-DAPPLE)
	SET(EXTRALIB dl)
ELSEIF (UNIX)  
    MESSAGE(STATUS "Now is UNIX-like OS's. Including aPPLE os x  and CygWin")  
    ADD_DEFINITIONS(-DUNIX)
	SET(EXTRALIB dl)
ENDIF ()  
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(test)

#set(LIBNAME "liblkt.a")
#add_custom_target(combined ALL COMMAND ${CMAKE_AR} rcs ${LIBNAME} $<TARGET_FILE:locketcipher> ../openssl/${PLATFORM}/lib/libcrypto.a)
INSTALL(FILES dep/openssl-${PLATFORM}/${SUBPLATFORM}/lib/libcrypto.a dep/openssl-${PLATFORM}/${SUBPLATFORM}/lib/libssl.a dep/libevent-${PLATFORM}/${SUBPLATFORM}/lib/libevent.a  DESTINATION lib/${SUBPLATFORM})
